#ifndef FSPHENIX_DETCONS_H
#define FSPHENIX_DETCONS_H

#include <vector>
#include <string>

#include <TObject.h>
#include <TString.h>

using namespace std;


class sPHENIX_DetectorConstruction : public TObject
{
 public:
  sPHENIX_DetectorConstruction();
  virtual ~sPHENIX_DetectorConstruction();

 public:
  void ConstructMaterials();
  void ConstructGeometry();
  string ConvertNum(Int_t ii);

  // - World
  /// \return The world full length
  Double_t GetWorldFullWidth()   {return fWorldWidth;};
  /// \return The world full length
  Double_t GetWorldFullLength()   {return fWorldLength;};
 
  // - EM Calorimeter
  /// \return The absorber fill length
  Double_t GetFEMCalAbsorberLength()  {return fEMCalAbsorberLength;};
  /// \return The sensing material full length
  Double_t GetFEMCalSensingLength()  {return fEMCalSensingLength;};
  /// \return The tower full width
  Double_t GetFEMCalTowerWidth()  {return fEMCalTowerWidth;};
  /// \return The number of Cells
  Int_t GetEMCalNofCells()  {return EMCalNofCells;};
  /// \return The number of towers along one axis
  Int_t GetEMCalNofTowersAxis()  {return EMCalNofTowersAxis;};
  /// \return The full length of central hole
  Int_t GetEMCalNofTowersHole()  {return EMCalNofTowersHole;};
  /// \return The location of calorimeter on zaxis
  Double_t GetEMCalLocation()  {return EMCalLocation;};
 
  // - Beam Pipe
  /// \return The outer radius of beam pipe
  Double_t GetBeamROuter()   {return fBeamROuter;};

  // - GEMS
  /// \return The world full GEM length
  Double_t GetNofGEMs()   {return NofGEMs;};
  /// \return The full GEM length
  Double_t GetGEMFullLength()   {return fGEMLength;};
  /// \return The full GEM thickness
  Double_t GetGEMFullThickness()   {return fGEMThickness;};
  /// \return The angle spanned by GEMS
  Double_t GetGEMRapidity()   {return fGEMRapidity;};
  /// \return The location of GEM1 on zaxis
  Double_t GetGEMLocation(Int_t i)  {return GEMLocation[i];};

  // - Preshower
  /// \return The location of preshower on zaxis
  Double_t GetPreshowerLocation()  {return PreshowerLocation;};
  Double_t GetPreshowerLength() {return fPreshowerLength;};

  // - Hadronic Calorimeter
  /// \return The absorber fill length
  Double_t GetFHCalAbsorberLength()  {return fHCalAbsorberLength;};
  /// \return The sensing material full length
  Double_t GetFHCalSensingLength()  {return fHCalSensingLength;};
  /// \return The tower full width
  Double_t GetFHCalTowerWidth()  {return fHCalTowerWidth;};
  /// \return The number of Cells
  Int_t GetHCalNofCells()  {return HCalNofCells;};
  /// \return The number of towers along one axis
  Int_t GetHCalNofTowersAxis()  {return HCalNofTowersAxis;};
  /// \return The full length of central hole
  Int_t GetHCalNofTowersHole()  {return HCalNofTowersHole;};
  /// \return The location of calorimeter on zaxis
  Double_t GetHCalLocation()  {return HCalLocation;};

 private:
  // - World
  Double_t  fWorldWidth;         ///< Full width of the world volume
  Double_t  fWorldLength;         ///< Full length of the world volume
  
  // - EM Calorimeter
  Double_t  fEMCalAbsorberLength;     ///< Full length of absorber
  Double_t  fEMCalSensingLength;       ///< Full length of scintillator
  Double_t  fEMCalTowerWidth;         ///< Full width of tower
  Int_t     EMCalNofCells;            ///< Nb of cells of abs/scint
  Int_t     EMCalNofTowersAxis;       ///< Nb of towers along one axis
  Int_t     EMCalNofTowersHole;       ///< Nb of towers fitting in the hole
  Double_t  EMCalLocation;           ///< Location of Calorimeter on Zaxis
  
  // - BeamPipe 
  Double_t  fBeamROuter;          ///< Outer Radius of Beam Pipe
                                  ///< Also Inner Radius of GEMs

  // - GEMS
  Int_t     NofGEMs;             ///< Number of GEMS
  Double_t  fGEMLength;           ///< Full length of GEM
  Double_t  fGEMThickness;        ///< Full thickness of GEM (Carbon)
  Double_t  fGEMRapidity;         ///< Rapidity of GEMS
  vector<Double_t> GEMLocation;  ///< Location of First GEM

  // - Preshower
  Double_t  PreshowerLocation;   ///< Preshower Location on Zaxis
  Double_t  fPreshowerLength;     ///< Preshower Thickness

  // - Hadronic Calorimeter
  Double_t  fHCalAbsorberLength;     ///< Full length of absorber
  Double_t  fHCalSensingLength;       ///< Full length of scintillator
  Double_t  fHCalTowerWidth;         ///< Full width of tower
  Int_t     HCalNofCells;            ///< Nb of cells of abs/scint
  Int_t     HCalNofTowersAxis;       ///< Nb of towers along one axis
  Int_t     HCalNofTowersHole;       ///< Nb of towers fitting in the hole
  Double_t  HCalLocation;           ///< Location of Calorimeter on Zaxis
  

  // Material Ids
  Int_t     ImedAir;             ///< The Air medium Id
  Int_t     ImedPb;              ///< The Lead medium Id
  Int_t     ImedSc;              ///< The SensingMat medium Id
  Int_t     ImedBe;              ///< The Beryllium medium Id
  Int_t     ImedC;               ///< The Carbon medium Id
  Int_t     ImedAr;              ///< The Argon medium Id
  Int_t     ImedFe;              ///< The Iron medium Id

  ClassDef(sPHENIX_DetectorConstruction,1); //sPHENIX_DetectorConstruction
};

#endif // FSPHENIX_MC_APPLICATION_H
